package com.jiyun.fegin;

import com.jiyun.common.model.TreeNode;
import com.jiyun.common.model.Yiwc;
import com.jiyun.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @projectName: 2210A-project1
 * @package: com.jiyun.fegin
 * @className: CatalogFegin
 * @author: 耿嘉军
 * @date: 2023/8/25 19:16
 * @version: 1.0
 */
@FeignClient(value = "day06catalog")
public interface CatalogFegin {

    @RequestMapping("/catalog/findCatalog0")
    public R findCatalog0(@RequestParam("name") String name);

    @RequestMapping("/catalog/catalogList")
    public List<TreeNode> catalogList();

    @RequestMapping("/catalog/countYiwc")
    public List<Yiwc> countYiwc(@RequestParam("courseId") Integer courseId,@RequestParam("playId") Integer playId);

    @RequestMapping("/catalog/findTree")
    public Yiwc findTree(@RequestParam("courseId") Integer courseId,@RequestParam("playId") Integer playId,@RequestParam("treeId") Integer treeId);

    @RequestMapping("/catalog/saveYiwc")
    boolean saveYiwc();
}
